package com.ruoyi.project.system.vehicles.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.vehicles.mapper.VeVehiclesMapper;
import com.ruoyi.project.system.vehicles.domain.VeVehicles;
import com.ruoyi.project.system.vehicles.service.IVeVehiclesService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 车辆Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-08
 */
@Service
public class VeVehiclesServiceImpl implements IVeVehiclesService 
{
    @Autowired
    private VeVehiclesMapper veVehiclesMapper;

    /**
     * 查询车辆
     * 
     * @param vehicleID 车辆主键
     * @return 车辆
     */
    @Override
    public VeVehicles selectVeVehiclesByVehicleID(Long vehicleID)
    {
        return veVehiclesMapper.selectVeVehiclesByVehicleID(vehicleID);
    }

    /**
     * 查询车辆列表
     * 
     * @param veVehicles 车辆
     * @return 车辆
     */
    @Override
    public List<VeVehicles> selectVeVehiclesList(VeVehicles veVehicles)
    {
        return veVehiclesMapper.selectVeVehiclesList(veVehicles);
    }

    @Override
    public List<VeVehicles> getVeVehiclesList() {
        return veVehiclesMapper.getVeVehiclesList();
    }

    /**
     * 新增车辆
     * 
     * @param veVehicles 车辆
     * @return 结果
     */
    @Override
    public int insertVeVehicles(VeVehicles veVehicles)
    {
        return veVehiclesMapper.insertVeVehicles(veVehicles);
    }

    /**
     * 修改车辆
     * 
     * @param veVehicles 车辆
     * @return 结果
     */
    @Override
    public int updateVeVehicles(VeVehicles veVehicles)
    {
        return veVehiclesMapper.updateVeVehicles(veVehicles);
    }

    /**
     * 批量删除车辆
     * 
     * @param vehicleIDs 需要删除的车辆主键
     * @return 结果
     */
    @Override
    public int deleteVeVehiclesByVehicleIDs(String vehicleIDs)
    {
        return veVehiclesMapper.deleteVeVehiclesByVehicleIDs(Convert.toStrArray(vehicleIDs));
    }

    /**
     * 删除车辆信息
     * 
     * @param vehicleID 车辆主键
     * @return 结果
     */
    @Override
    public int deleteVeVehiclesByVehicleID(Long vehicleID)
    {
        return veVehiclesMapper.deleteVeVehiclesByVehicleID(vehicleID);
    }
}
